import apiClient from './apiClint'

/*系统配置相关接口 */
export const systemApi = {
    getConfig() {
        return apiClient.get('/addons/cms/api.common/init')
    }
}
// 用户相关接口
export const userApi = {
  doLogin(data) {
    return apiClient.post('/api/custome_pc/doLogin', data)
  },
  doLogout() {
    return apiClient.get('/api/custome_pc/logout')
  },
  userIsExist(data){//查询手机号是否已注册并发送验证码
    return apiClient.post('/api/custome_pc/userIsExist',data)
  },
  userRegister(data){//注册用户
    return apiClient.post('/api/custome_pc/userRegister',data)
  },
  getCaptchaId() {
    return apiClient.get('/api/common/captcha')
  },
}

export const httpApi = {
    //获取课程
    getLessons(){ 
      return apiClient.get('/api/custome_pc/getLessons')
    },

    //获取课程考试时间
    getLessonExamtime(){ 
      return apiClient.get('/api/custome_pc/getLessonExamtime')
    },
    getPoint(data){ //获取知识点数据
      return apiClient.post('/api/custome_pc/getPoint',data)
    },
    getDayTask(data){ //获取当天的学习任务
      return apiClient.post('/api/custome_pc/getDayTask',data)
    },
    getPercentData(data){ //获取学习进度
      return apiClient.post('/api/custome_pc/getPercentData',data)
    },
    getLastNotice(){ //获取最新公告
      return apiClient.get('/api/custome_pc/getLastNotice')
    },
    getCommunityList(data){ //获取同学社区列表
      return apiClient.post('/api/custome_pc/getCommunityList',data)
    },
    getWeekTopic(data){ //获取周题目列表
      return apiClient.post('/api/custome_pc/getWeekTopic',data)
    },
    myLevel(data){ //获取我的水平
      return apiClient.post('/api/custome_pc/myLevel',data)
    },
    setPlan(data){ //设置学习计划
      return apiClient.post('/api/custome_pc/setPlan',data)
    },
    getOutlineList(data){ //获取大纲列表
      return apiClient.post('/api/custome_pc/getOutlineList',data)
    },
    getTeaching(data){ //获取教材内容
      return apiClient.post('/api/custome_pc/getTeaching',data)
    },
    getChapter(data){ //获取章节内容
      return apiClient.post('/api/custome_pc/getChapter',data)
    },
    getCatalog(data){ //获取章节目录
      return apiClient.post('/api/custome_pc/getCatalog',data)
    },
    getCatalogByEmphasize(data){//获取重要程度目录
      return apiClient.post('/api/custome_pc/getCatalogByEmphasize',data)
    },
    getWeakness(data){//获取薄弱点
      return apiClient.post('/api/custome_pc/getWeakness',data)
    },
    getVideoList(data){//获取视频列表
      return apiClient.post('/api/custome_pc/getVideoList',data)
    },
    getStatuteList(){//获取法规列表
      return apiClient.get('/api/custome_pc/getStatuteList')
    },
    getStatuteDetail(data){//获取法规详情
      return apiClient.post('/api/custome_pc/getStatuteDetail',data)
    },
    getTrueList(data){//获取真题列表
      return apiClient.post('/api/custome_pc/getTrueList',data)
    },
    getPaperTopic(data){//获取试卷题目
      return apiClient.post('/api/custome_pc/getPaperTopic',data)
    },
    getTopicFeedback(data){//获取题目评论
      return apiClient.post('/api/custome_pc/getTopicFeedback',data)
    },
    setTopicCollect(data){//设置收藏
      return apiClient.post('/api/custome_pc/setTopicCollect',data)
    },
    getTopicCollect(){//获取收藏列表
      return apiClient.get('/api/custome_pc/getTopicCollect')
    },
    submitFeedback(data){//获取题目评论
      return apiClient.post('/api/custome_pc/submitFeedback',data)
    },
    setUserTopic(data){//提交用户做题列表
      return apiClient.post('/api/custome_pc/setUserTopic',data)
    },
    getExamComment(data){//获取考试评语
      return apiClient.post('/api/custome_pc/getExamComment',data)
    },
    getSimulatedList(data){//获取模拟考试列表
      return apiClient.post('/api/custome_pc/getSimulatedList',data)
    },
    getSection(data){//获取节目录
      return apiClient.post('/api/custome_pc/getSection',data)
    },
    getSectionTopic(data){//获取节题目
      return apiClient.post('/api/custome_pc/getSectionTopic',data)
    },
    getChapterWrong(data){//获取章节错题
      return apiClient.post('/api/custome_pc/getChapterWrong',data)
    },
    getSectionWrong(data){//获取节错题
      return apiClient.post('/api/custome_pc/getSectionWrong',data)
    },
    getCommunityDetail(data){//获取同学社区详情
      return apiClient.post('/api/custome_pc/getCommunityDetail',data)
    },
    addContent(data){//添加同学社区回复
      return apiClient.post('/api/custome_pc/addContent',data)
    },
    getAiSetting(){//获取AI设置
      
      return apiClient.get('/api/custome_pc/getAiSetting')
    },
    sellLessons(){//获取可购买课程
      return apiClient.get('/api/custome_pc/sellLessons')
    },
    submitOrder(data){//提交购买课程
      return apiClient.post('/api/custome_pc/submitOrder',data)
    },
    pollingOrder(data){//轮询订单状态
      return apiClient.post('/api/custome_pc/pollingOrder',data)
    },
    setOrderExpired(data){//轮询订单状态
      return apiClient.post('/api/custome_pc/setOrderExpired',data)
    }
    

}

// 文章相关接口
export const articleApi = {
  getList(params) {
    return apiClient.get('/articles', { params })
  },
  create(data) {
    return apiClient.post('/articles', data)
  }
}

// 其他模块接口...